"""
网格式布局
"""
import matplotlib.pyplot as plt
import matplotlib.gridspec as mg

plt.figure("Grid Layout",facecolor="lightgray")

gs = mg.GridSpec(3,3) # 创建一个3x3网格对象
# 合并
plt.subplot(gs[0,0:2])
plt.text(0.5,0.5,"test",ha="center",va="center",size=20)
plt.grid(linestyle=":",color="red",linewidth=2)
# 网格线设置，每个刻度做垂直组成的网格图形
plt.tight_layout()
plt.show()
